Grouping data topic
Group discrete values.
Functions
-
group<
T, K> (Iterable< Grouping dataT> iterable, K key(T)) → Map<K, List< T> > -
Groups the specified
iterableof values into an Map fromkeyto list of value. -
groupSort<
T, K> (Iterable< Grouping dataT> iterable, K key(T), [num valueComparator(List<T> , List<T> ) = ascending, num keyComparator(K, K) = ascending]) → List<K> -
Groups the specified
iterableof elements according to the specifiedkeyfunction, sorts the groups according to the specifiedvalueComparatorfor values andkeyComparatorfor keys, and then returns a list of keys in sorted order. -
index<
T, K> (Iterable< Grouping dataT> iterable, K key(T)) → Map<K, List< T> > - Equivalent to group but returns a unique value per compound key instead of an list, throwing if the key is not unique.
-
rollup<
T, R, K> (Iterable< Grouping dataT> iterable, R reduce(List<T> ), K key(T)) → Map<K, R> -
Groups and reduces the specified
iterableof values into an Map from key to value. -
rollupSort<
T, R, K> (Iterable< Grouping dataT> iterable, R reduce(List<T> ), K key(T), [num valueComparator(R, R) = ascending, num keyComparator(K, K) = ascending]) → List<K> -
Groups and reduces the specified
iterableof elements according to the specifiedkeyfunction, sorts the reduced groups according to the specifiedvalueComparatorfor values andkeyComparatorfor keys, and then returns a list of keys in sorted order.